package org.db2.project.airline.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import java.io.Serializable;


/**
 * The persistent class for the BOOKING database table.
 */
@Entity
public class Booking implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @SequenceGenerator(name = "BOOKING_ID_GENERATOR", sequenceName = "BOOKING_SEQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "BOOKING_ID_GENERATOR")
    private long id;

    //bi-directional many-to-one association to BookingStatus
    @ManyToOne
    @JoinColumn(name = "BOOKINGSTATUSID")
    private BookingStatus bookingStatus;

    //bi-directional many-to-one association to Client
    @ManyToOne
    @JoinColumn(name = "CLIENTID")
    private Client client;

    //bi-directional many-to-one association to FlightPlan
    @ManyToOne
    @JoinColumn(name = "FLIGHTPLANID")
    private FlightPlan flightPlan;

    public Booking() {
    }

    public long getId() {
        return this.id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public BookingStatus getBookingStatus() {
        return this.bookingStatus;
    }

    public void setBookingStatus(BookingStatus bookingStatus) {
        this.bookingStatus = bookingStatus;
    }

    public Client getClient() {
        return this.client;
    }

    public void setClient(Client client) {
        this.client = client;
    }


    public FlightPlan getFlightPlan() {
        return this.flightPlan;
    }

    public void setFlightPlan(FlightPlan flightPlan) {
        this.flightPlan = flightPlan;
    }

}